//使用reverse_iterator逆序打印一个vector。
#include<iostream>
#include<vector>
#include<list>
#include<algorithm>
#include<iterator>
#include<fstream>
#include<string>
using namespace std;
int main(int argc, char *argv[])
{
	if (argc != 2) {
		cout << "introduct:execise.exe in_file" << endl;
		return -1;
	}
	ifstream in(argv[1]);
	if (!in) {
		cout << "error to open ifile" << endl;
		exit(1);
	}
	vector<int>vi;
	int v;
	while (in >> v)
		vi.push_back(v);
	for (auto r_iter = vi.crbegin(); r_iter != vi.crend(); ++r_iter)
		cout << *r_iter << " ";
	cout << endl;
}